Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureAD: Support email, when userPrincipalName (upn) is not available #289

Merged
merged 1 commit into from Mar 13, 2017

Conversation

taktran
Copy link
Contributor

@taktran taktran commented Jan 11, 2017

Support the email field, when userPrincipalName is not available.

From the Azure Active Directory graph API documentation about userPrincipalName (upn):

This property is required when a work or school account is created; it is optional for local accounts.

https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#contact-entity

When upn is not available, profile.email stores the email, so fall back on this value.

Have tested on an account created from live.com, where the email value exists there, but not upn.

@ldesplat ldesplat added the feature New functionality or improvement label Jan 26, 2017
@ldesplat ldesplat added this to the 8.5.1 milestone Mar 13, 2017
@ldesplat
Copy link
Contributor

Thanks for the PR. It finally makes it in :)

@ldesplat ldesplat merged commit 4426d64 into hapijs:master Mar 13, 2017
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants